package com.springcloud.zuuldemo.config

import com.springcloud.zuuldemo.locator.DynamicRouteLocator
import org.springframework.boot.autoconfigure.session.RedisSessionConfiguration
import org.springframework.boot.autoconfigure.web.ServerProperties
import org.springframework.cloud.netflix.zuul.filters.ZuulProperties
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration

@Configuration
class ZuulConfig {

    @Bean
    DynamicRouteLocator locator(ServerProperties serverProperties,ZuulProperties zuulProperties)
    {

        new DynamicRouteLocator(serverProperties.servlet.path,zuulProperties)
    }

}
